clean up, and png pseudocode