close- I ended up going with http://stackoverflow.com/a/22671394