add test case; a general interface designed