I have seen some thing similar to this:

http://www.ibmwr.org/otech/beadbreaker.html