added dismiss block

needed to run completion code after view was dismissed