convert some string to class object