refactoring && add next listener