initial commit

Add various functions and helper functions to deal with survey analysis