added cosine similarity and flask list