Updated query in OCaml version