First Complete Version but Undebugged. Require Extensive Test Case Run