refactor and fix suggestion api change