weird race condition but otherwise p good