implement score query