fixed hw1-2.js for poper output