add basic io functions