refactoring on between method