split of functions to a seperate helper module