minor refactoring
fixed merge conflict