changed name of optional function from debug to scoreCalculated