Added flash handler