added display and ppm writing