modify input handling for select() to simplify groupBy() method
trying a method for groupBy multiple factors