perfect tempo implementation