updated function names to align with haskell version