minor refactoring
completed minor refactoring