Use helper function instead of own code
Fix #164
Added changelog