Work in progress... version 4.0