updated deprecated usage of flash bags