added method on motion sensor trigger