add conditionals for action buttons