major refactoring no.2