Added some logic to the camera factory