extract methods for clarity