more refactoring

refactoring