Refactor /pgen/1 to avoid drop & return