converted to a class