Added continuity measure cos similarity