got rid of all gobal pointers