implemenent queue
work with any iterations count
calc average result of number of measurements
small refactoring