move a bunch of functions to a helper class

so they can be shared