moving averages more accurate. fixed main so it persists the idMap
put json back in resources so tests pass