added termination printing