cleaning up discharge