made flashes optional