adding allocation cleanup