rewrote effect handling