Added rest of cases to implementation of convert