change the resource of the last layer