reorganizing of states, buttons and text