before refactoring the logic