fixed memory allocation
makefile