Added functionality to capture a photo