added get_x_hat for debugging