preparations for complete re-write