moved resource definition to router