Added score function