Adding delegate implementation code.