modified avior.js