moving linedrawings out of the for loop