helper function to generate public uris