updated roman numerals algorithm