remove unnecessary comments and couts; add necessary comments