to compute scoreS
cleanup