start using variable hashes instead
finished rewrite. splitting vars into hash array instead of string, then replacing values