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