corrected the output structure of function score with one function that has a filter