cleaning up discrete output