updated to work with custom mongodb broker