updated comments and fixed c.cpp