Implemented flip x and flip y