added photo taking functionality.