ported some generic functions to a utility object