removed memory.h dependency