changed cameraId from double to int