finish Exercise3.9~3.11