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

use helper functions