was passing by value instead of a pointer. i am so stupid it hurts
clean up debugging stuff