Rewrite my agree function.