Added some stuff for motion mode