added router arg to controller constructor