adding new logic for urlparams and widdata
extended to allow parameters to survive