improved memory mgmt