Extracted some methods to improve readability