update max_score method, but performance drop