port js from jsfiddle
packages update