violated DRY with prejudice

I copied the function to get the return function and the button click to
do the same thing.