removed gratuitous dependency on Data.Map