amended animate() to fix 'this' reference