converted amazon.js to funcjs arch