add to result
added accumulation and statistics