Added Code

Copied my Gist from https://gist.github.com/cecilomar/6330907