added Shutdown Hook