memory allocation test code added