added cameraReady variable