tightened up JS