partitial solution for ex02_2