added interface and class for Resource