modify to support menu