fix test cases functionality