finished implementing new template rw system in variable_set.h and stream.h