Updated Score function