finished implementation of SinglePlane case, to be tested