added motion detecttor