added tab merge functions