played with memory allocation