fixed a lot of the errors