added pwq boundary code credit