some serious duplication cleanup