Complete getting resource logic