updating delegate method to newer format