change dialogclass to nested class