refactor pacman builder