added unk and sorting to lcs