add more comments and remove more not needed codes