feat: create separate flash function