implemented the menu function
Added the menu machanism, subscribe function and the exit option