converting to usage of Resource