Convert to a class