working on #12 and #9

working on #12 and #9