Finish scoring function