a few changes to js