fixed a *lot* of errors