Added open dialog function