Added timer functionality to see whether mulithreading is necessary