fixed some errors in the class