optimize Pmenu