fixing the comments, checking correctness