implement take photo and select photo