refactor tuple