added basic score function