cam.cpp corrected