improve edit dialog