fixed PIM query