Tested: more tests to ensure correct behavior