added tp and dialog