Seems like this could be made a utility class?