small changes and re-tangled