buttons and legend