change menu into using loop