setup flash mode