finish new tab functionality