added motion detection and basic camera capture