fixing syntax errors on convert method