Added functionality to take pictures