Version 2.0 with lots of stolen  code