added last tab functionality