added some funtions, menu and menuBar