changed DB query from time-based one (highly non-optimal) to hard previous-5000 ids
changed timeout to 1 second
added latest/last reading for each flow
added 'last reading' to each flow label