ami.js class