making the resources list a function instead of a list