refactoring to make things more clear and easier to integrate policy changes