Added functionality to take picture