working best and updated Prog3

Part 1 of the assignment