learning about $resource