separate candidate logic in paint_line to make it easier to implement erase_line