Added new necessary stuff for play_motion