merging tuan code