understanding lock structure