updated method for assigning each tab a unique url