use a completion block for calling delegate, after dismiss itself