create unload method