import from code.google.com/p/road-rage, minus binary data