use passedTime instead frames