old experiment salvaged from jsfiddle