move menu creation further up to make it easier to find