add auto unbinding when scope is exited