create_substitution function

Constructor function for substitution class.