Added a getDocument and putDocument that returns length of bson record.