added somre more unit tests and reordered an operation.  I think I know the problem now, but don't know how to fix it yet