Changed gains and added Z and W