update to compare bson and adding tests