WIP: dialog more advanced, export not thoroughly tested yet