basic test cases pass. will merge to master