copied parsing function to constructor with string passed to it
constructor with passed string now passes string to function to parse the string to split into variables