helped to get open new tab working by nick quinn