implements taking pictures with the webcam