correcting JS