added water flip function