reversed a change to the generateURL() till can fix some problems associated with it