refactoring to be more clear