update button and tab index