speedier AJAX thanks to https://coderwall.com/p/of7y2q