small changes to js