fixed some errors and comments