more simpler apap.js