HW3 part 3 adding all checks
hw3 part 3