add time meassurment, is buggy