gets the correct values for the first three tests but still has timing hazards