smoothed out lines, added perfect mode