converted pm fields to local variables