pulled click listener setup out into a separate method