rebuilt referer parser