Added motion detection to update view