add test for $? value