updated scoring functionality