copy source of before refactor