code moved from main-random, renderMenu still called