flatten the buttons