referring url parsing and tests