ll for inserting distinct nodes