using writeIORef.
splitting IORef.