new completion class and fix bug