Added better url retrieval