remove repeat code on dialog folder