flatten buttons