Added and implemented the flipHorizontalMethod