Implement XPWD and comment PWD