extract locked method in controller