counting average parallel fix