code for pat