fixed a lot of it, getting closer to working