the conversion from dictionary into a class