updated code for complete URIs