Created delegate and implemented delegate method.