modify to ready for refactoring