Adding comments and fixing a bug in geting ccs