added an rm because I'm having memory allocation problems