adding tab functionality