made a few changes to BaseResource class