memory allocation drives me insane