Added delegate and hooked it up