restructure io package