add codes and docs written in Dec 2005