start of camera code