updated to work with MarkLogic 7