refactored some SNVC code