move parseURL function as module