changed the resource access method.