snp refactoring