now possible to pass a router to a resource. Closes #2