WORKING VERSION
+ further simplifications