improve edit and new functionality