update the delegate method