added hbridge code