added function to compare two urls; cleanup