implemented basic design, not tested