Removed unnecessary memory allocation