discrete optimization

Signed-off-by: Abel Xie <jinjing.xie@gmail.com>
Signed-off-by: Abel Xie <jinjing.xie@gmail.com>