added locks_leader (not 100% complete)