adding missing api calls, and adding some more things to test.js