changed motion detect output to integer