add eachPair and update basics