use defer do unlock