Shared objects help!

hi guys im making a game atm and i have a shared objects highscore, its working fine, the scores pass through, problem is i have first, second, and third. obviously i want the the highest score at the top, for some reason its just putting the last played score on the top, over and over. dunno whats going on his my code can anyone help me???

stop();
scorefin = SharedObject.getLocal(“highscores”);
var thescore = _global.finalScoreShiftAsNumber
var thetimer = _global.finaltimeasnumber

if (timer1 == undefined) {
score.data.timer1 = 0;
timer1 = 0;
}
if (timer2 == undefined) {
score.data.timer2 = 0;
timer2 = 0;
}
if (timer3 == undefined) {
score.data.timer3 = 0;
timer3 = 0;
}
score.flush();

if (thetimer > timer1) {
scorefin.data.timer3 = scorefin.data.timer2;
scorefin.data.timer2 = scorefin.data.timer1;
scorefin.data.timer1 = thetimer;

scorefin.data.score3 = scorefin.data.score2;
scorefin.data.score2 = scorefin.data.score1;
scorefin.data.score1 = thescore;

} else if (thetimer==timer1 || thetimer>timer2){
scorefin.data.timer3 = scorefin.data.timer2;
scorefin.data.timer2 = thetimer;

scorefin.data.score2 = thescore;

} else if (thetimer == timer3 || thetimer>timer3) {

scorefin.data.timer3 = thetimer;

scorefin.data.score3 = thescore;

} else {
trace(“nothing”);
}
timer1_txt.text = scorefin.data.timer1;
timer2_txt.text = scorefin.data.timer2;
timer3_txt.text = scorefin.data.timer3;

score1_txt.text = scorefin.data.score1;
score2_txt.text = scorefin.data.score2;
score3_txt.text = scorefin.data.score3;