added function score