added dir_png function