Sw refactor