framework for calculating score