Converted to a class structure