moved nswap_attempts to its own line