Implementation of #14

Addresses #14: I tried to follow your coding style as close as possible. I'd love to have this feature available. If you want some things changed or tested or whatever, just let me know.