refactor factions