fixed ticket 1332
moved helper method to util class
Merge pull request #269 from igal-getrailo/jira-1332

fixed ticket 1332