updating version to v1.2.2 and publishing to npm