added loop to add menu item and handle to 2d array
check if we called it on the same path; and added variables