further work o rest controller