timing issues in tests but working