replace old-fashioned variables with valid ones