generate zip small refactor