add hide-lines, uniquify functions