wrote test function into test.html file