[TASK]move menu code to a menu layer