optimization for r.js