remove pointers where not needed