prototyping added
factored out score computation into compute_score()