split codes to a new file: snpKING.cpp