converting to templatized IO system