made randomlines quicker by using a set instead of a list