answers to #9 and #10