on before flip callback added