polishing up some js