fix a bug that if resolve with 2 arguments
updates README.md
fixes resolve(~)
adds test cases