added generic mongo interface to example.