merging controllers to a single controller