code from elder version, controller serves requests