Update to version 2.2

fix one bug which will lead to wrong anwsers when running on spark