W command test code