helper method to convert id to url