add spark effect, refactoring