modified flash fxn