implementation of simple benchmarking loop