revise the solution of prb_11, add two tests