improving tab functionality3