refactored some testcases