Earlier I had added the some logic under url-maker function, but thing's didn't work out. 
while doing so realized, it would be good to move these functions above so that other function like url-maker could use it in future if required.