added getURL function