attempt at modularizing controllers