move SVC generation to separate function