before refactroing