assignment 3 - codes and i/o files