added take photo function step 3