use helper functions
Merge pull request #136 from dildick/master

use helper functions