removed  unnescessary allocations