Building the convert() method