bson_ext added for performance