solution for third homework 7960724