minor refactor
Merge pull request #781 from adrianob/minor_refactor

minor refactor