Work on euclidean distance model