added untested code

This may or may not work, I haven't tested it.