javascript now working and score implemented