moving scaling to from py to ocaml