This part could be in a utility class too.