freeing resources again