change detect motion from int to bool