There is a better way to specify the resource listener