changing the layout of the main window changing file and directory of name