added RT count and Fav count, also improved IO by doing it only once per iteration