fix error in $$. Add test cases to test $$.