add "ok = false;" for conversion failure