compare:add compare func