changed a bunch of stuff, gives odd runtime error