initial working prototype of resource add