menu helper, with tests