Added flipResult code.