added generic generator with dir parameter (dir holds -zNN- files)