Updated effect code