Moving common code of a method to seprate method and then calling