WIP restful: addition of pagination

ok will change that.