add logging, swap counts