issue #6 and issue #16: complete the implementation (not tested)