optimize for flash