working on #18 and #42