callback can stop transition if needed