changed code for new H-bridges