updated the motion sensor project (untested)