all tests passing. Some voodoo required.