Added the take picture functionality