finished up the prog1 code