fix for url comparisons
added code comments