small changes and add haskell stuff to convert after to python