merging changes from v2.2, part II