updated context based using cosine