added support for passing in mongo index objects