finished! before refactor