write normalize function (and reverse and strip_leading_Tw helper functions)! with help from the haskell prelude (very clever recursion). is there a better way?