releasing resources improved