fix retries
switch to hashmap for stats