more rewriting and start on fig. 3