solve exercise #21