added a method for setting resource path