lemke bugs corrected, but tests are still needed