separate generic function in own module