added IO and probably mucked up fifteen other things in the process