some refactor
minor refactoring