added ability to toggle flash