enhanced function et added tab selection