add function of taking a picture and saving the picture