optimize mongo parsing.