added the x and g part matrices to matrix wa