COPY of pafm, just added ZIP functionality