refactoring for clarity.