improve readability and structure