duplicate controller code cleanup