add flash functionality.