v2.2

logic optimization