Try out https://gist.github.com/dhruvasagar/5553071