implement get_score function