solve exercise #10