[#3] move flashing to a module