flash service/refactoring