add variable to methods to pass different arrays