Merging tabs functionality