updated to work as we.js plugin structure