Add expect function.