Working on javascript final