move things around and add a monads file
a broken attempt to do a counting version of insert