creatin' controller factory for better codin'