minor refactoring

minor refactoring