small refac
Merge pull request #924 from adrianob/small_refactor

small refac