updated menu logic