added AMD/CommonJS module wrapper