removed unused codes and useless comments