refactor internals for improved readability