I think this should be `direction.toLowerCase().contentEquals("horizontal")`