[bugfix] refactor extend