tweaking javascript