debugging score function