Trying to get this to work with the ST Monad. Not working.