Me friend has reminded me this piece of divine code. I am wrote it myself (by copying and modifying from stackoverflow) and stil has no clue how it working but it working! #haskell