minor upgrade for friend.php