refactored flip event triggering