working on #7, should also close #27