Added all checks for HW3