line is added to list in second if