method before refactor