resource initialization clean up