Modify code to output score