Distribution code for input added and Graceful termination code complete