convert the convertor class to constructor