Issue #12

Complete implementation