changed convert method