solve exercise #30