Update converter JS to work with number type input