solution to the first homework 2972554