makes timeFunc return output correctly