completed pair

contain lots of printing lines as are not fully tested but I think the
logic is sound