the location was not being checked. also, the length of an array is part of the constructor and not in OCaml