Extract lock state name logic to seperate method