solution to p81 and p82