changed structure for flash