university ocaml project. first time, so probably ugly