added take photo function step 2