ex06: copy&paste some code from ex05