eliminating unsafePerformIO