added connection to motion sensor