functional scoring via cosine simularity