adding mongo replica_primary check