work in progress : menu and modes added for demo purpose (many changes made only for that purpose)