port most remaining test cases