remove 2 useless memory allocation