https://github.com/steveio/CircularBuffer in case anyone interested and https://github.com/steveio/ArrayStats for running trend analysis