cleanup draw function
split ps files