added javascript for hw2