fixed a few things, still not working correctly