refactored into controller mini-applications using router