adding new service for getting code in a resource