Added logic to adapter arbitrary columns