more work on monadic structure