minor refactoring
Merge pull request #567 from reynardmh/master

minor refactoring