update buttons and layout