introducing a better implementation to deal with encoded urls