seperated the initialisation of the camera from the main program