add some comments, remove a console log