Part of step-7 implemented.