Starting a function to select variables.