memory deallocation added