Developing function convertToPrefix