typos and invalid js code