changed a few things that should make it run better, still have to test