changed Xpel_w parameter order