patched resolution
added test cases