Old code copied.