removing a lot of stuff that shouldnt be done in c