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