fixed some functions in the classes