Added fourth
simplify 1st and 2nd
Simplify 3rd and 4th
5th in ocaml