modify comment and fix bugs