Copied over to cpor_pub_sw08.py