fixed dialog window, added more tests