updating it to work with js
close sim after test run