https://gist.github.com/tybenz/5716005 added to shortener