completed with terminal menu and reorganized