improved #pm, added #commands