it uses name instead of resource

reverting the change...after discussion.