added reference point and solve. No tests on solve routine yet