Implementing chapter5 component code samples.