partial implementation of score