move functions to new helper classes