added new flash mechanism