created tab swap in/out functinos