lots of stuff
better message for pattern match failures