refactoring and redesigning