make use of built-in Promise
fixes iterator,iterateAsync
added new feature to "equals" test function