changed and simplified interface to esnstrument.js