Implemeted the score calculation, close #10.