How could be better decompose this method?