Added scoring logic