add tests, factor out score data function