modified loop bug
added score element and modified loop bug