removed unnecessary allocation of memory