resources will now be closed after processing