modified front controller to take parameters and separate dispatch call