updated js assignment 6