Loop and dynamic menu implemented