changes to similarity and added for lacma similarity