improve the flash light code