Added implementation for #293

If you guys think #293 is a good idea, here is a possible implementation.