solve exercise #77