working on #12 and #9