add more tests. fix tuple reuse issue.