refactor parsing of Snp into func