Rewrite in Haskell
Add binary