fixed a few errors, still one left before it will compile