fixed failed refactor