fixed BUG in centroid calculation
expanded it to all the three context vectors