implement new resource system without need for exception throwing for type conversion