test changes

We can just use ```then(onsuccess, onerror)``` instead of ```then(onsuccess).catch(onerror)```.