Successfully integrated Clinton's code into Dan's code