now works with pm and guards