trying to do some memory management.