refactor menu helper #251