minor code arrangement change in frontend_test.js