optimization2 on scope.js