moving duplicate code to separate method. step 2