fixed some but not all of the errors