added horizontal flip