add the solution of roman to int and refactor code