version 4.0

Almost complete