completed swap, sum1 and sum 2