solution for discussion 5 1245871