rewrite of haiku generator!