refactoring and continue