refactor for clarity.