implemented hflip