clean up code; add retransmission of finish notification