working on #8 and #812