replace timeouts with transition complete handlers