done before refactor