Implemented ex4-9