create delegate and conform to protocol