update TSDAG to be improved with more testing cases