added code to try and take a picture and show it right after