extract methods to increase readability