update HBox code to match VBox