moved tuple gymanstics code.