update to button control and main