added timeout function to displaymenu