refactoring, check again