Changed to add deallocates