Added score calculation and output