compare function between user and computer